package com.sunyard.dal.mapper;

import com.sunyard.dal.bo.device.lock.LockQueryBO;
import com.sunyard.dal.entity.Lock;

import java.util.List;

public interface LockMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(Lock record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(Lock record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    Lock selectByPrimaryKey(Integer id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(Lock record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(Lock record);

    /**
     * 分页查询锁具信息
     *
     * @param lockQueryBO [lockQueryBO]
     * @return List<Lock>
     **/
    List<Lock> getLockByPage(LockQueryBO lockQueryBO);

    /**
     * 通过锁名称查询锁信息
     *
     * @param lockName [lockName]
     * @return Lock
     **/
    Lock getLockByKeyName(String lockName);

    /**
     * 更新锁识别号
     *
     * @author: guangw.dang
     * @Date: 2022/7/5 15:26
     **/
    void updateLockSn();

    /**
     * 删除锁信息
     *
     * @author: shuai.zhang
     * @Date: 2022/7/5 15:26
     **/
    void updateById(Lock record);

    /**
     * 激活锁
     *
     * @author: shuai.zhang
     * @Date: 2022/7/5 15:26
     **/
    void initLock(Lock lock);

    /**
     * 通过机构号查询锁信息
     *
     * @author: shuai.zhang
     * @Date: 2022/7/6 15:26
     **/
    List<Lock> getLockInfoByOrg(List<String> list);

    void insertListLocks(List<Lock> list);


}